package cn.kilo.infrastructure.persistent.dao;

import cn.kilo.domain.model.order.entity.MGuardEntity;
import cn.kilo.domain.model.order.entity.MRiderEntity;
import cn.kilo.domain.model.order.entity.MSorterEntity;
import cn.kilo.domain.model.order.entity.OrderEntity;
import cn.kilo.infrastructure.persistent.po.Order;
import cn.kilo.infrastructure.persistent.vo.MGuard;
import cn.kilo.infrastructure.persistent.vo.MRider;
import cn.kilo.infrastructure.persistent.vo.MSorter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.security.Guard;
import java.util.List;

/**
 * @author kilok
 */
@Mapper
public interface IOrderDao {
    int saveOrder(@Param("order") Order order);

    int saveOrderInfoPicture(@Param("orderId") Long orderId,@Param("url") String url);

    List<Order> getCreateOrderByRidgepole(@Param("ridgepole") String ridgepole);

    Order queryOrderByOrderId(@Param("orderId") Long orderId);

    List<Order> getUserOrder(@Param("userId") String userId,
                             @Param("status") String status);

    void updateOrderStatus(@Param("order") OrderEntity order);

    void setOrderError(@Param("orderId") Long orderId,@Param("status") String info);

    List<Order> getAllUserOrder(@Param("order") OrderEntity order);


    Long getAllSalary();


    List<Order> getAllOrder();


    List<MRider> getAllRiderBySorter1();

    List<MRider> getRiderBy(@Param("riderEntity") MRiderEntity riderEntity);

    List<MGuard> getAllGuard();

    List<Guard> getGUardBy(@Param("guard") MGuardEntity guard);

    List<MSorter> getAllSorter();

    List<MSorter> getSorterBy(@Param("sorter") MSorterEntity sorter);
}
